import Vue from 'vue'
import App from './App.vue'
import axios from 'axios';
import VueAxios from 'vue-axios';
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'; //element-ui-css

axios.defaults.baseURL = '/api'; //添加路径
axios.defaults.timeout = 8000; //响应时间

//请求拦截
axios.interceptors.request.use(config => {
  console.log(config);
  return config;
})

//响应拦截
axios.interceptors.response.use(response => {
  console.log(response);
  return response;
})

//挂载插件
Vue.use(VueAxios, axios);
Vue.use(ElementUI);

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')
